package cn.ryh.listener.code;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @ClassName CodeServletContextListener
 * @Description 通过代码注册Listener,实现ServletContextListener接口，监听ServletContext的创建与销毁
 * @Author RaoYH
 */
public class CodeServletContextListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {

        System.out.println("CodeServletContextListener 初始化");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

        System.out.println("CodeServletContextListener 销毁");
    }
}
